package presentacion;

import java.sql.SQLException;
import java.util.Vector;

import dominio.Aeronave;
import dominio.Incidencia;
import dominio.Reporte;
import utilidades.Agente;
import utilidades.TConsulta;

public class main {
	public static void main(String... args){
		Agente ag = Agente.getAgente();
		try {
			Vector a = ag.select(TConsulta.AERONAVE, "Select * FROM aeronave" );
		} catch (SQLException e) {
			System.out.println(e);
			e.printStackTrace();
		} catch (Exception e) {
			System.out.println(e);
			e.printStackTrace();
		}
		Incidencia i = new Incidencia(25, "no funciona nada", "ninguna", "reporte");
		Aeronave avion = new Aeronave("EC1ASDA", "B747", 1994, "1994", "operativa", 123);
		Reporte r = new Reporte(1, 2, "piloto", avion);
		try {
			r.insertDB();
		} catch (SQLException e1) {
			System.out.println(e1);
			// TODO Auto-generated catch block
			e1.printStackTrace();
		} catch (Exception e1) {
			System.out.println(e1);
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
		try {
			i.insertDB();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			System.out.println(e);
			e.printStackTrace();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			System.out.println(e);
			e.printStackTrace();
		}
	}
}
